﻿@using ST.Torch.WebApi.Web.Core;
@inherits UtilRazorPage<object>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>登录</title>
    <link rel="stylesheet" href="/PearAdmin/component/pear/css/pear.css" />
    <link rel="stylesheet" href="/PearAdmin/admin/css/other/login.css" />
    <link rel="stylesheet" href="/PearAdmin/admin/css/variables.css" />
    @*     <script>if (window.self != window.top) { top.location.reload(); }</script> *@
    <style>
        .login-page{
            display:flex;
            flex-direction:column;
            height:100vh
        }
        .head{
            background-color: #e7372a;
            height:8vh;
            width:100%;
            align-items:center
          
        }

            .head .f{
                color:white;
                font-size:40px;
                margin-left:70px;
                
                height:100%;
                display: flex;
                align-items: center
              
            }


        .content{
            height: 83vh;
            background-color: #ffffff;
            width: 100%;
            display: flex;
        }

        .contentV2 {
            height: 5vh;
            background-color: #ffffff;
            width: 100%;
            display: flex;
        }


         .left {
            height: 90vh;
            /* background-color: black; */
                height: 100%;
            width: 20%;
            
        }

     .right {
            height: 90vh;
            /* background-color: fuchsia; */
            height:100%;
            flex:1;
            display:flex;
            flex-wrap: wrap;
         
            align-content: flex-start;
            justify-content: flex-start;
            margin-left:20px;
        }

            .right .box {
                    border: 1px solid #c2c2c2; /* 边框样式 */
                    border-radius: 10px; /* 圆角大小 */
                    width:250px;
                    margin-left: 10px;
                    margin-top: 10px;
                    height:100px;
                    display: flex;
                    flex-direction: column;
            }

        .box .top{
            /* height:80%; */
            width:100%;
            display: flex;
            align-items: flex-end;
            flex-direction: row;
        }

        .box .top .BTleft {
            width:60%;
                margin-left: 20px;
                /* margin-top: 20px; */
                margin-bottom: 14px;
        }

         .box .top .BTright {
                width: 40%;
                margin-top: 20px;
                font-size:50px;
                color: #e63629;
         }
         .BTline{
            border: 3px solid #e63629; /* 边框样式 */
            height:1px;
            width:80%;
            border-radius: 10px; /* 圆角大小 */
            margin-left: 20px;
            background-color: #e63629;
         }
        .box .bottom {
            height: 20px;
            width: 100%;

        }
        .foot{
            background-color: #e7372a;
            width: 100%;
            height: 2vh;
        }

        .divTopTitle{
            color: #e63629;
            display:flex;
            align-items:center;
          
        }
        .topline{
            height:60% ;
            width:2px;
            background-color: #e7372a;
        }
        .Contentleft{
            margin-left: 20px;
        }

        .leftTopImg{
            position:relative
        }

        .leftTopImgT1 {
            position: absolute
        }

        .leftTopImgT2 {
            position: absolute
        }

        .text-overlay1 {
            position: absolute;
            top: -80px;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            color: #d3d3d3; /* 文字颜色 */
            font-size: 30px;
        }

        .text-overlay2 {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            color: #e53529; /* 文字颜色 */
            font-size: 80px;
   
        }
        
    </style>
</head>

<body>
    <div class="login-page">
        <div class="head f">
            
            <div class="f">实时数据</div>
        </div>
        <div class="contentV2">
            <div class="left divTopTitle" style="margin-top:5px;font-size:28px;padding-left:60px">
                <div class="topline Contentleft" style="margin-left:10px;margin-right:10px"></div>
                <div class="divTop">火炬点亮总数量</div>
                
            </div>
            <div class="right divTopTitle" style="margin-top:10px;font-size:28px">
                <div class="topline" style="margin-left:10px;margin-right:10px"></div>
                各行火炬点亮数量
            </div>
        </div>
      
        <div class="content">
            <div class="left" style="margin-top:26px;padding-left:60px">
                <div class="leftTopImg" >
                    <img width="100%" src="~/images/fireTotal.png" />
                    <div class="text-overlay1">总数量</div>
                    <div class="text-overlay2" id="totalDiv">66666</div>
                  </div>
                <div class="leftbottomImg" style="text-align: center;"><img src="~/images/fire.png" /></div>

            </div>
            <div class="right" id="BoxDiv">
               
                <div class="box">
                    <div class="top">
                        <div class="BTleft">啊啊啊支行</div>
                        <div class="BTright">560</div>
                    </div>
                    <div class="bottom">
                        <div class="BTline"></div>
                    </div>
                </div>
                <div class="box">
                    <div class="top">
                        <div class="BTleft">啊啊啊支行</div>
                        <div class="BTright">560</div>
                    </div>
                    <div class="bottom">
                        <div class="BTline"></div>
                    </div>
                </div>
                <div class="box">
                    <div class="top">
                        <div class="BTleft">啊啊啊支行</div>
                        <div class="BTright">560</div>
                    </div>
                    <div class="bottom">
                        <div class="BTline"></div>
                    </div>
                </div>
                <div class="box">
                    <div class="top">
                        <div class="BTleft">啊啊啊支行</div>
                        <div class="BTright">560</div>
                    </div>
                    <div class="bottom">
                        <div class="BTline"></div>
                    </div>
                </div>
            </div>
        </div>
        <div class="foot"></div>
    </div>
    <!-- 资 源 引 入 -->
    <script src="/PearAdmin/component/layui/layui.js"></script>
    <script src="/PearAdmin/component/pear/pear.js"></script>
    <script>
        layui.use(['form', 'button', 'popup',  'jquery'], function () {
            var form = layui.form;
            var button = layui.button;
            var popup = layui.popup;
            var $ = layui.jquery;



            function GetData(){
                //GetTotalNumber
                $.ajax({
                    type: 'get',
                    //url: '/api/System/Login',//发送请求
                    url: '/api/Torch/GetTotalNumber',//发送请求
    
                    success: function (result) {
                        console.log(result)
                        var data=result.Data;
                        var ListData=data.data;
                        $("#totalDiv").html(data.total)
                        var htmlStr='';
                        for(var i in ListData){
                            var name=ListData[i].name;
                            var number=ListData[i].number;
                             htmlStr+=`
                            <div class="box">
                                <div class="top">
                                    <div class="BTleft">`+name+`</div>
                                    <div class="BTright">`+number+`</div>
                                </div>
                                <div class="bottom">
                                    <div class="BTline"></div>
                                </div>
                            </div>`
                           
                        }
                        $("#BoxDiv").html(htmlStr)
                         
                    }
                });
            }
           GetData();
            setInterval(function(){
             GetData();
            },3000)

           
        })
    </script>
</body>

</html>
